//分类管理
import request from '@/utils/request'
//获取分页的副类和主类
//url: "/api/otherClasses/{page}/{limit}" get
export const reqOtherClassesList = (page,limit)=>request({url:`/otherClasses/${page}/${limit}`,method:'get'});
//获取所有主类
//url: /api/classList get
export const reqMainClassesList = ()=>request({url:'/classList',method:'get'});
//增加主类
//url: /api/mainClasses/{mainClassName} post
export const reqInsertMainClass = (mainClassName)=>request({url:`/mainClasses/${mainClassName}`,method:'post'});
//删除主类
//url: /api/mainClasses/delete/{mainClassId} post
export const reqDeleteMainClass = (mainClassId)=>request({url:`/mainClasses/delete/${mainClassId}`,method:'post'});
//增加副类
//url: /api/otherClasses/{mainClassId}/{otherClassName} post
export const reqInsertOtherClass = (mainClassId,otherClassName)=>request({url:`/otherClasses/${mainClassId}/${otherClassName}`,method:'post'});
//删除副类
//url: /api/otherClasses/delete/{otherClassId} post
export const reqDeleteOtherClass = (otherClassId)=>request({url:`/otherClasses/delete/${otherClassId}`,method:'post'});
//修改副类
//url: /api/otherClasses/update post data
export const reqUpdateOtherClass = (data)=>request({url:'/otherClasses/update',method:'post',data});